package cn.wolfcode.wolfcodemall.mapper;

import cn.wolfcode.wolfcodemall.domain.Category;
import cn.wolfcode.wolfcodemall.qo.CategoryQo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryMapper {
    int deleteByPrimaryKey(Integer categoryId);

    int insert(Category record);

    Category selectByPrimaryKey(Integer categoryId);

    List<Category> selectAll();

    int updateByPrimaryKey(Category record);

    //条件查询
    List<Category> selectByCondition(CategoryQo qo);

    //保存分类属性
    void insertCategoryProperty(@Param("propertyName") String propertyName, @Param("categoryId") Integer categoryId);

    //根据分类id查询属性信息
    List<String> selectPropertyNameByCategoryId(Integer categoryId);

    //根本分类id删除属性信息
    void deletePropertyByCategoryId(Integer categoryId);

    //根据分类id查询商品id
    List<Integer> selectProductIdByCategoryId(Integer categoryId);

    //根据商品分类id查询商品信息
//    List<Category> selectByCategoryId(@Param("categoryId") Integer categoryId);
}